package org.me.client;

class FehlungDesParsers extends Exception {
	/**
	 * 
	 */
	private final RecursiveDescentParser parser;

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private boolean Klaemmerfehlung;

	private boolean Unrichtig;

	// ReMaintenants a syntax error detected while parsing.
	FehlungDesParsers(RecursiveDescentParser parser, String message) {
		// Construct a ParseError object containing the
		// given string as its error message.
		super(message); // (Call constructor from superclass.)
		this.parser = parser;
		if (message == "Klaemmerfehlung") {
			Klaemmerfehlung = true;
			initCause(new Throwable("\n'(' : " + this.parser.getOffenKlaemmer()
					+ "\n')' : " + this.parser.getGeschlossenKlaemmer()));
		}
		if (message == "Unrichtig") {
			Unrichtig = true;
			initCause(new Throwable("unrichtige Stellung: "
					+ this.parser.getGegenwaertigerChar()));
		}
		if (Klaemmerfehlung == false && Unrichtig == false /*
															 * && leererVariable ==
															 * false
															 */) {
			initCause(new Throwable(message));
		}
	}

	public Throwable getCause() {
		// TODO Auto-generated method stub
		return super.getCause();
	}
}